﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HermesProxy.World.Enums
{
    [Flags]
    public enum SpellHitType
    {
        CritDebug          = 0x01,
        Crit               = 0x02,
        HitDebug           = 0x04,
        Split              = 0x08,
        VictimIsAttacker   = 0x10,
        AttackTableDebug   = 0x20,
        Unk                = 0x40,
        NoAttacker         = 0x80, // does the same as SPELL_ATTR4_COMBAT_LOG_NO_CASTER
    };

    public enum SpellMissInfo
    {
        None = 0,
        Miss = 1,
        Resist = 2,
        Dodge = 3,
        Parry = 4,
        Block = 5,
        Evade = 6,
        Immune = 7,
        Immune2 = 8, // One Of These 2 Is MissTempimmune
        Deflect = 9,
        Absorb = 10,
        Reflect = 11
    }
    [Flags]
    public enum SpellCastTargetFlags
    {
        None           = 0x00000000,
        Unused1        = 0x00000001,               // Not Used
        Unit           = 0x00000002,               // Pguid
        UnitRaid       = 0x00000004,               // Not Sent, Used To Validate Target (If Raid Member)
        UnitParty      = 0x00000008,               // Not Sent, Used To Validate Target (If Party Member)
        Item           = 0x00000010,               // Pguid
        SourceLocation = 0x00000020,               // Pguid, 3 Float
        DestLocation   = 0x00000040,               // Pguid, 3 Float
        UnitEnemy      = 0x00000080,               // Not Sent, Used To Validate Target (If Enemy)
        UnitAlly       = 0x00000100,               // Not Sent, Used To Validate Target (If Ally)
        CorpseEnemy    = 0x00000200,               // Pguid
        UnitDead       = 0x00000400,               // Not Sent, Used To Validate Target (If Dead Creature)
        GameObject     = 0x00000800,               // Pguid, Used With TargetGameobjectTarget
        TradeItem      = 0x00001000,               // Pguid
        String         = 0x00002000,               // String
        GameobjectItem = 0x00004000,               // Not Sent, Used With TargetGameobjectItemTarget
        CorpseAlly     = 0x00008000,               // Pguid
        UnitMinipet    = 0x00010000,               // Pguid, Used To Validate Target (If Non Combat Pet)
        GlyphSlot      = 0x00020000,               // Used In Glyph Spells
        DestTarget     = 0x00040000,               // Sometimes Appears With DestTarget Spells (May Appear Or Not For A Given Spell)
        ExtraTargets   = 0x00080000,               // Uint32 Counter, Loop { Vec3 - Screen Position (?), Guid }, Not Used So Far
        UnitPassenger  = 0x00100000,               // Guessed, Used To Validate Target (If Vehicle Passenger)\
        Unk400000      = 0x00400000,
        Unk1000000     = 0X01000000,
        Unk4000000     = 0X04000000,
        Unk10000000    = 0X10000000,
        Unk40000000    = 0X40000000,

        UnitMask = Unit | UnitRaid | UnitParty | UnitEnemy | UnitAlly | UnitDead | UnitMinipet | UnitPassenger,
        GameobjectMask = GameObject | GameobjectItem,
        CorpseMask = CorpseAlly | CorpseEnemy,
        ItemMask = TradeItem | Item | GameobjectItem
    }
    [Flags]
    public enum CastFlag : uint
    {
        None           = 0x00000000,
        PendingCast    = 0x00000001, // 4.x NoCombatLog
        HasTrajectory  = 0x00000002,
        Unknown2       = 0x00000004,
        Unknown3       = 0x00000008,
        Unknown4       = 0x00000010,
        Projectile     = 0x00000020,
        Unknown5       = 0x00000040,
        Unknown6       = 0x00000080,
        Unknown7       = 0x00000100,
        Unknown8       = 0x00000200,
        Unknown9       = 0x00000400,
        PredictedPower = 0x00000800,
        Unknown10      = 0x00001000,
        Unknown11      = 0x00002000,
        Unknown12      = 0x00004000,
        Unknown13      = 0x00008000,
        Unknown14      = 0x00010000,
        AdjustMissile  = 0x00020000, // 4.x
        NoGcd          = 0x00040000,
        VisualChain    = 0x00080000, // 4.x
        Unknown18      = 0x00100000,
        RuneInfo       = 0x00200000, // 4.x PredictedRunes
        Unknown19      = 0x00400000,
        Unknown20      = 0x00800000,
        Unknown21      = 0x01000000,
        Unknown22      = 0x02000000,
        Immunity       = 0x04000000, // 4.x
        Unknown23      = 0x08000000,
        Unknown24      = 0x10000000,
        Unknown25      = 0x20000000,
        HealPrediction = 0x40000000, // 4.x
        Unknown27      = 0x80000000
    }
    public enum SpellCastSource
    {
        Player  = 2,
        Normal  = 3,
        Item    = 4,
        Passive = 7,
        Pet     = 9,
        Aura    = 13,
        Spell   = 16,
    }

    public enum AuraType
    {
        None                                = 0,
        BindSight                           = 1,
        ModPossess                          = 2,
        PeriodicDamage                      = 3,
        Dummy                               = 4,
        ModConfuse                          = 5,
        ModCharm                            = 6,
        ModFear                             = 7,
        PeriodicHeal                        = 8,
        ModAttackspeed                      = 9,
        ModThreat                           = 10,
        ModTaunt                            = 11,
        ModStun                             = 12,
        ModDamageDone                       = 13,
        ModDamageTaken                      = 14,
        DamageShield                        = 15,
        ModStealth                          = 16,
        ModStealthDetect                    = 17,
        ModInvisibility                     = 18,
        ModInvisibilityDetect               = 19,
        ObsModHealth                        = 20,
        ObsModPower                         = 21,
        ModResistance                       = 22,
        PeriodicTriggerSpell                = 23,
        PeriodicEnergize                    = 24,
        ModPacify                           = 25,
        ModRoot                             = 26,
        ModSilence                          = 27,
        ReflectSpells                       = 28,
        ModStat                             = 29,
        ModSkill                            = 30,
        ModIncreaseSpeed                    = 31,
        ModIncreaseMountedSpeed             = 32,
        ModDecreaseSpeed                    = 33,
        ModIncreaseHealth                   = 34,
        ModIncreaseEnergy                   = 35,
        ModShapeshift                       = 36,
        EffectImmunity                      = 37,
        StateImmunity                       = 38,
        SchoolImmunity                      = 39,
        DamageImmunity                      = 40,
        DispelImmunity                      = 41,
        ProcTriggerSpell                    = 42,
        ProcTriggerDamage                   = 43,
        TrackCreatures                      = 44,
        TrackResources                      = 45,
        Unk46                               = 46,
        ModParryPercent                     = 47,
        Unk48                               = 48,
        ModDodgePercent                     = 49,
        ModCriticalHealingAmount            = 50,
        ModBlockPercent                     = 51,
        ModWeaponCritPercent                = 52,
        PeriodicLeech                       = 53,
        ModHitChance                        = 54,
        ModSpellHitChance                   = 55,
        Transform                           = 56,
        ModSpellCritChance                  = 57,
        ModIncreaseSwimSpeed                = 58,
        ModDamageDoneCreature               = 59,
        ModPacifySilence                    = 60,
        ModScale                            = 61,
        PeriodicHealthFunnel                = 62,
        Unk63                               = 63,
        PeriodicManaLeech                   = 64,
        ModCastingSpeedNotStack             = 65,
        FeignDeath                          = 66,
        ModDisarm                           = 67,
        ModStalked                          = 68,
        SchoolAbsorb                        = 69,
        ExtraAttacks                        = 70,
        ModSpellCritChanceSchool            = 71,
        ModPowerCostSchoolPct               = 72,
        ModPowerCostSchool                  = 73,
        ReflectSpellsSchool                 = 74,
        ModLanguage                         = 75,
        FarSight                            = 76,
        MechanicImmunity                    = 77,
        Mounted                             = 78,
        ModDamagePercentDone                = 79,
        ModPercentStat                      = 80,
        SplitDamagePct                      = 81,
        WaterBreathing                      = 82,
        ModBaseResistance                   = 83,
        ModRegen                            = 84,
        ModPowerRegen                       = 85,
        ChannelDeathItem                    = 86,
        ModDamagePercentTaken               = 87,
        ModHealthRegenPercent               = 88,
        PeriodicDamagePercent               = 89,
        Unk90                               = 90,
        ModDetectRange                      = 91,
        PreventsFleeing                     = 92,
        ModUnattackable                     = 93,
        InterruptRegen                      = 94,
        Ghost                               = 95,
        SpellMagnet                         = 96,
        ManaShield                          = 97,
        ModSkillTalent                      = 98,
        ModAttackPower                      = 99,
        AurasVisible                        = 100,
        ModResistancePct                    = 101,
        ModMeleeAttackPowerVersus           = 102,
        ModTotalThreat                      = 103,
        WaterWalk                           = 104,
        FeatherFall                         = 105,
        Hover                               = 106,
        AddFlatModifier                     = 107,
        AddPctModifier                      = 108,
        AddTargetTrigger                    = 109,
        ModPowerRegenPercent                = 110,
        AddCasterHitTrigger                 = 111,
        OverrideClassScripts                = 112,
        ModRangedDamageTaken                = 113,
        ModRangedDamageTakenPct             = 114,
        ModHealing                          = 115,
        ModRegenDuringCombat                = 116,
        ModMechanicResistance               = 117,
        ModHealingPct                       = 118,
        Unk119                              = 119,
        Untrackable                         = 120,
        Empathy                             = 121,
        ModOffhandDamagePct                 = 122,
        ModTargetResistance                 = 123,
        ModRangedAttackPower                = 124,
        ModMeleeDamageTaken                 = 125,
        ModMeleeDamageTakenPct              = 126,
        RangedAttackPowerAttackerBonus      = 127,
        ModPossessPet                       = 128,
        ModSpeedAlways                      = 129,
        ModMountedSpeedAlways               = 130,
        ModRangedAttackPowerVersus          = 131,
        ModIncreaseEnergyPercent            = 132,
        ModIncreaseHealthPercent            = 133,
        ModManaRegenInterrupt               = 134,
        ModHealingDone                      = 135,
        ModHealingDonePercent               = 136,
        ModTotalStatPercentage              = 137,
        ModMeleeHaste                       = 138,
        ForceReaction                       = 139,
        ModRangedHaste                      = 140,
        ModRangedAmmoHaste                  = 141,
        ModBaseResistancePct                = 142,
        ModResistanceExclusive              = 143,
        SafeFall                            = 144,
        ModPetTalentPoints                  = 145,
        AllowTamePetType                    = 146,
        MechanicImmunityMask                = 147,
        RetainComboPoints                   = 148,
        ReducePushback                      = 149,
        ModShieldBlockvaluePct              = 150,
        TrackStealthed                      = 151,
        ModDetectedRange                    = 152,
        SplitDamageFlat                     = 153,
        ModStealthLevel                     = 154,
        ModWaterBreathing                   = 155,
        ModReputationGain                   = 156,
        PetDamageMulti                      = 157,
        ModShieldBlockvalue                 = 158,
        NoPvpCredit                         = 159,
        ModAoeAvoidance                     = 160,
        ModHealthRegenInCombat              = 161,
        PowerBurnMana                       = 162,
        ModCritDamageBonusMelee             = 163,
        Unk164                              = 164,
        MeleeAttackPowerAttackerBonus       = 165,
        ModAttackPowerPct                   = 166,
        ModRangedAttackPowerPct             = 167,
        ModDamageDoneVersus                 = 168,
        ModCritPercentVersus                = 169,
        DetectAmore                         = 170,
        ModSpeedNotStack                    = 171,
        ModMountedSpeedNotStack             = 172,
        Unk173                              = 173,
        ModSpellDamageOfStatPercent         = 174,
        ModSpellHealingOfStatPercent        = 175,
        SpiritOfRedemption                  = 176,
        AoeCharm                            = 177,
        ModDebuffResistance                 = 178,
        ModAttackerSpellCritChance          = 179,
        ModFlatSpellDamageVersus            = 180,
        Unk181                              = 181,
        ModResistanceOfStatPercent          = 182,
        ModCriticalThreat                   = 183,
        ModAttackerMeleeHitChance           = 184,
        ModAttackerRangedHitChance          = 185,
        ModAttackerSpellHitChance           = 186,
        ModAttackerMeleeCritChance          = 187,
        ModAttackerRangedCritChance         = 188,
        ModRating                           = 189,
        ModFactionReputationGain            = 190,
        UseNormalMovementSpeed              = 191,
        ModMeleeRangedHaste                 = 192,
        MeleeSlow                           = 193,
        ModTargetAbsorbSchool               = 194,
        ModTargetAbilityAbsorbSchool        = 195,
        ModCooldown                         = 196,
        ModAttackerSpellAndWeaponCritChance = 197,
        Unk198                              = 198,
        ModIncreasesSpellPctToHit           = 199,
        ModXpPct                            = 200,
        Fly                                 = 201,
        IgnoreCombatResult                  = 202,
        ModAttackerMeleeCritDamage          = 203,
        ModAttackerRangedCritDamage         = 204,
        ModSchoolCritDmgTaken               = 205,
        ModIncreaseVehicleFlightSpeed       = 206,
        ModIncreaseMountedFlightSpeed       = 207,
        ModIncreaseFlightSpeed              = 208,
        ModMountedFlightSpeedAlways         = 209,
        ModVehicleSpeedAlways               = 210,
        ModFlightSpeedNotStack              = 211,
        ModRangedAttackPowerOfStatPercent   = 212,
        ModRageFromDamageDealt              = 213,
        Unk214                              = 214,
        ArenaPreparation                    = 215,
        HasteSpells                         = 216,
        Unk217                              = 217,
        HasteRanged                         = 218,
        ModManaRegenFromStat                = 219,
        ModRatingFromStat                   = 220,
        ModDetaunt                          = 221,
        Unk222                              = 222,
        RaidProcFromCharge                  = 223,
        Unk224                              = 224,
        RaidProcFromChargeWithValue         = 225,
        PeriodicDummy                       = 226,
        PeriodicTriggerSpellWithValue       = 227,
        DetectStealth                       = 228,
        ModAoeDamageAvoidance               = 229,
        Unk230                              = 230,
        ProcTriggerSpellWithValue           = 231,
        MechanicDurationMod                 = 232,
        Unk233                              = 233,
        MechanicDurationModNotStack         = 234,
        ModDispelResist                     = 235,
        ControlVehicle                      = 236,
        ModSpellDamageOfAttackPower         = 237,
        ModSpellHealingOfAttackPower        = 238,
        ModScale2                           = 239,
        ModExpertise                        = 240,
        ForceMoveForward                    = 241,
        ModSpellDamageFromHealing           = 242,
        ModFaction                          = 243,
        ComprehendLanguage                  = 244,
        ModAuraDurationByDispel             = 245,
        ModAuraDurationByDispelNotStack     = 246,
        CloneCaster                         = 247,
        ModCombatResultChance               = 248,
        ConvertRune                         = 249,
        ModIncreaseHealth2                  = 250,
        ModEnemyDodge                       = 251,
        ModSpeedSlowAll                     = 252,
        ModBlockCritChance                  = 253,
        ModDisarmOffhand                    = 254,
        ModMechanicDamageTakenPercent       = 255,
        NoReagentUse                        = 256,
        ModTargetResistBySpellClass         = 257,
        Unk258                              = 258,
        ModHotPct                           = 259,
        ScreenEffect                        = 260,
        Phase                               = 261,
        AbilityIgnoreAurastate              = 262,
        AllowOnlyAbility                    = 263,
        Unk264                              = 264,
        Unk265                              = 265,
        Unk266                              = 266,
        ModImmuneAuraApplySchool            = 267,
        ModAttackPowerOfStatPercent         = 268,
        ModIgnoreTargetResist               = 269,
        ModAbilityIgnoreTargetResist        = 270,
        ModDamageFromCaster                 = 271,
        IgnoreMeleeReset                    = 272,
        XRay                                = 273,
        AbilityConsumeNoAmmo                = 274,
        ModIgnoreShapeshift                 = 275,
        Unk276                              = 276,
        ModMaxAffectedTargets               = 277,
        ModDisarmRanged                     = 278,
        InitializeImages                    = 279,
        ModArmorPenetrationPct              = 280,
        ModHonorGainPct                     = 281,
        ModBaseHealthPct                    = 282,
        ModHealingReceived                  = 283,
        Linked                              = 284,
        ModAttackPowerOfArmor               = 285,
        AbilityPeriodicCrit                 = 286,
        DeflectSpells                       = 287,
        IgnoreHitDirection                  = 288,
        Unk289                              = 289,
        ModCritPct                          = 290,
        ModXpQuestPct                       = 291,
        OpenStable                          = 292,
        OverrideSpells                      = 293,
        PreventRegeneratePower              = 294,
        Unk295                              = 295,
        SetVehicleId                        = 296,
        BlockSpellFamily                    = 297,
        Strangulate                         = 298,
        Unk299                              = 299,
        ShareDamagePct                      = 300,
        SchoolHealAbsorb                    = 301,
        Unk302                              = 302,
        ModDamageDoneVersusAurastate        = 303,
        ModFakeInebriate                    = 304,
        ModMinimumSpeed                     = 305,
        Unk306                              = 306,
        HealAbsorbTest                      = 307,
        Unk308                              = 308,
        Unk309                              = 309,
        ModCreatureAoeDamageAvoidance       = 310,
        Unk311                              = 311,
        Unk312                              = 312,
        Unk313                              = 313,
        PreventRessurection                 = 314,
        UnderwaterWalking                   = 315,
        PeriodicHaste                       = 316
    }

    [Flags]
    public enum AuraFlagsVanilla : ushort
    {
        None         = 0x00,
        Cancelable   = 0x01,
        EffectIndex2 = 0x02,
        EffectIndex1 = 0x04,
        EffectIndex0 = 0x08,
    };

    [Flags]
    public enum AuraFlagsTBC : ushort
    {
        None          = 0x00,
        EffectIndex0  = 0x01,
        EffectIndex1  = 0x02,
        EffectIndex2  = 0x04,     // Pre-WotLK: debuffs can't be queried using this flag. Unused in UI since 1.10.0, new meaning unknown (still the same?)
        Unk4          = 0x08,     // Pre-WotLK: unused in UI
        Cancelable    = 0x10,
        NotCancelable = 0x20,
    };

    [Flags]
    public enum AuraFlagsWotLK : ushort
    {
        None         = 0x00,
        EffectIndex0 = 0x01,
        EffectIndex1 = 0x02,
        EffectIndex2 = 0x04,
        NoCaster     = 0x08,
        Positive     = 0x10,
        Duration     = 0x20,
        Unk2         = 0x40,
        Negative     = 0x80
    };

    [Flags]
    public enum AuraFlagsModern : ushort
    {
        None       = 0x00,
        NoCaster   = 0x01,
        Cancelable = 0x02,
        Duration   = 0x04,
        Scalable   = 0x08,
        Negative   = 0x10,
        Unk20      = 0x20,
        Unk40      = 0x40,
        Unk80      = 0x80,
        Positive   = 0x100,
        Passive    = 0x200
    }

    public enum SpellCastResultVanilla : uint
    {
        AffectingCombat = 0,
        AlreadyAtFullHealth = 1,
        AlreadyAtFullPower = 2,
        AlreadyBeingTamed = 3,
        AlreadyHaveCharm = 4,
        AlreadyHaveSummon = 5,
        AlreadyOpen = 6,
        AuraBounced = 7,
        AutotrackInterrupted = 8,
        BadImplicitTargets = 9,
        BadTargets = 10,
        CantBeCharmed = 11,
        CantBeDisenchanted = 12,
        CantBeProspected = 13,
        CantCastOnTapped = 14,
        CantDuelWhileInvisible = 15,
        CantDuelWhileStealthed = 16,
        CantStealth = 17,
        CasterAurastate = 18,
        CasterDead = 19,
        Charmed = 20,
        ChestInUse = 21,
        Confused = 22,
        DontReport = 23,
        EquippedItem = 24,
        EquippedItemClass = 25,
        EquippedItemClassMainhand = 26,
        EquippedItemClassOffhand = 27,
        Error = 28,
        Fizzle = 29,
        Fleeing = 30,
        FoodLowLevel = 31,
        HighLevel = 32,
        HungerSatiated = 33,
        Immune = 34,
        Interrupted = 35,
        InterruptedCombat = 36,
        ItemAlreadyEnchanted = 37,
        ItemGone = 38,
        ItemNotFound = 39,
        ItemNotReady = 40,
        LevelRequirement = 41,
        LineOfSight = 42,
        LowLevel = 43,
        LowCastLevel = 44,
        MainhandEmpty = 45,
        Moving = 46,
        NeedAmmo = 47,
        NeedAmmoPouch = 48,
        NeedExoticAmmo = 49,
        NoPath = 50,
        NotBehind = 51,
        NotFishable = 52,
        NotHere = 53,
        NotInFront = 54,
        NotInControl = 55,
        NotKnown = 56,
        NotMounted = 57,
        NotOnTaxi = 58,
        NotOnTransport = 59,
        NotReady = 60,
        NotShapeshift = 61,
        NotStanding = 62,
        NotTradeable = 63,
        NotTrading = 64,
        NotUnsheathed = 65,
        NotWhileGhost = 66,
        NoAmmo = 67,
        NoChargesRemain = 68,
        NoChampion = 69,
        NoComboPoints = 70,
        NoDueling = 71,
        NoEndurance = 72,
        NoFish = 73,
        NoItemsWhileShapeshifted = 74,
        NoMountsAllowed = 75,
        NoPet = 76,
        NoPower = 77,
        NothingToDispel = 78,
        NothingToSteal = 79,
        OnlyAboveWater = 80,
        OnlyDayTime = 81,
        OnlyIndoors = 82,
        OnlyMounted = 83,
        OnlyNightTime = 84,
        OnlyOutdoors = 85,
        OnlyShapeshift = 86,
        OnlyStealthed = 87,
        OnlyUnderwater = 88,
        OutOfRange = 89,
        Pacified = 90,
        Possessed = 81,
        Reagents = 92,
        RequiresArea = 93,
        RequiresSpellFocus = 94,
        Rooted = 95,
        Silenced = 96,
        SpellInProgress = 97,
        SpellLearned = 98,
        SpellUnavailable = 99,
        Stunned = 100,
        TargetsDead = 101,
        TargetAffectingCombat = 102,
        TargetAurastate = 103,
        TargetDueling = 104,
        TargetEnemy = 105,
        TargetEnraged = 106,
        TargetFriendly = 107,
        TargetInCombat = 108,
        TargetIsPlayer = 109,
        TargetNotDead = 110,
        TargetNotInParty = 111,
        TargetNotLooted = 112,
        TargetNotPlayer = 113,
        TargetNoPockets = 114,
        TargetNoWeapons = 115,
        TargetUnskinnable = 116,
        ThirstSatiated = 117,
        TooClose = 118,
        TooManyOfItem = 119,
        Totems = 120,
        TrainingPoints = 121,
        TryAgain = 122,
        UnitNotBehind = 123,
        UnitNotInfront = 124,
        WrongPetFood = 125,
        NotWhileFatigued = 126,
        TargetNotInInstance = 127,
        NotWhileTrading = 128,
        TargetNotInRaid = 129,
        DisenchantWhileLooting = 130,
        ProspectWhileLooting = 131,
        NeedMoreItems = 132,
        TargetFreeForAll = 133,
        NoEdibleCorpses = 134,
        OnlyBattlegrounds = 135,
        TargetNotGhost = 136,
        TooManySkills = 137,
        TransformUnusable = 138,
        WrongWeather = 139,
        DamageImmune = 140,
        PreventedByMechanic = 141,
        PlayTime = 142,
        Reputation = 143,
        MinSkill = 144,
        Unknown = 145,

        SpellCastOk = 255      // custom value
    };

    public enum SpellCastResultTBC : uint
    {
        AffectingCombat = 0,
        AlreadyAtFullHealth = 1,
        AlreadyAtFullMana = 2,
        AlreadyAtFullPower = 3,
        AlreadyBeingTamed = 4,
        AlreadyHaveCharm = 5,
        AlreadyHaveSummon = 6,
        AlreadyOpen = 7,
        AuraBounced = 8,
        AutotrackInterrupted = 9,
        BadImplicitTargets = 10,
        BadTargets = 11,
        CantBeCharmed = 12,
        CantBeDisenchanted = 13,
        CantBeDisenchantedSkill = 14,
        CantBeProspected = 15,
        CantCastOnTapped = 16,
        CantDuelWhileInvisible = 17,
        CantDuelWhileStealthed = 18,
        CantStealth = 19,
        CasterAurastate = 20,
        CasterDead = 21,
        Charmed = 22,
        ChestInUse = 23,
        Confused = 24,
        DontReport = 25,
        EquippedItem = 26,
        EquippedItemClass = 27,
        EquippedItemClassMainhand = 28,
        EquippedItemClassOffhand = 29,
        Error = 30,
        Fizzle = 31,
        Fleeing = 32,
        FoodLowLevel = 33,
        HighLevel = 34,
        HungerSatiated = 35,
        Immune = 36,
        Interrupted = 37,
        InterruptedCombat = 38,
        ItemAlreadyEnchanted = 39,
        ItemGone = 40,
        ItemNotFound = 41,
        ItemNotReady = 42,
        LevelRequirement = 43,
        LineOfSight = 44,
        LowLevel = 45,
        LowCastLevel = 46,
        MainhandEmpty = 47,
        Moving = 48,
        NeedAmmo = 49,
        NeedAmmoPouch = 50,
        NeedExoticAmmo = 51,
        NoPath = 52,
        NotBehind = 53,
        NotFishable = 54,
        NotFlying = 55,
        NotHere = 56,
        NotInFront = 57,
        NotInControl = 58,
        NotKnown = 59,
        NotMounted = 60,
        NotOnTaxi = 61,
        NotOnTransport = 62,
        NotReady = 63,
        NotShapeshift = 64,
        NotStanding = 65,
        NotTradeable = 66,
        NotTrading = 67,
        NotUnsheathed = 68,
        NotWhileGhost = 69,
        NoAmmo = 70,
        NoChargesRemain = 71,
        NoChampion = 72,
        NoComboPoints = 73,
        NoDueling = 74,
        NoEndurance = 75,
        NoFish = 76,
        NoItemsWhileShapeshifted = 77,
        NoMountsAllowed = 78,
        NoPet = 79,
        NoPower = 80,
        NothingToDispel = 81,
        NothingToSteal = 82,
        OnlyAboveWater = 83,
        OnlyDayTime = 84,
        OnlyIndoors = 85,
        OnlyMounted = 86,
        OnlyNightTime = 87,
        OnlyOutdoors = 88,
        OnlyShapeshift = 89,
        OnlyStealthed = 90,
        OnlyUnderwater = 91,
        OutOfRange = 92,
        Pacified = 93,
        Possessed = 94,
        Reagents = 95,
        RequiresArea = 96,
        RequiresSpellFocus = 97,
        Rooted = 98,
        Silenced = 99,
        SpellInProgress = 100,
        SpellLearned = 101,
        SpellUnavailable = 102,
        Stunned = 103,
        TargetsDead = 104,
        TargetAffectingCombat = 105,
        TargetAurastate = 106,
        TargetDueling = 107,
        TargetEnemy = 108,
        TargedEnraged = 109,
        TargetFriendly = 110,
        TargetInCombat = 111,
        TargetIsPlayer = 112,
        TargetIsPlayerControlled = 113,
        TargetNotDead = 114,
        TargetNotInParty = 115,
        TargetNotLooted = 116,
        TargetNotPlayer = 117,
        TargetNoPockets = 118,
        TargetNoWeapons = 119,
        TargetUnskinnable = 120,
        ThirstSatiated = 121,
        TooClose = 122,
        TooManyOfItem = 123,
        TotemCategory = 124,
        Totems = 125,
        TrainingPoints = 126,
        TryAgain = 127,
        UnitNotBehind = 128,
        UnitNotInfront = 129,
        WrongPetFood = 130,
        NotWhileFatigued = 131,
        TargetNotInInstance = 132,
        NotWhileTrading = 133,
        TargetNotInRaid = 134,
        DisenchantWhileLooting = 135,
        ProspectWhileLooting = 136,
        NeedMoreItems = 137,
        TargetFreeForAll = 138,
        NoEdibleCorpses = 139,
        OnlyBattlegrounds = 140,
        TargetNotGhost = 141,
        TooManySkills = 142,
        TransformUnusable = 143,
        WrongWeather = 144,
        DamageImmune = 145,
        PreventedByMechanic = 146,
        PlayTime = 147,
        Reputation = 148,
        MinSkill = 149,
        NotInArena = 150,
        NotOnShapeshift = 151,
        NotOnStealthed = 152,
        NotOnDamageImmune = 153,
        NotOnMounted = 154,
        TooShallow = 155,
        TargetNotInSanctuary = 156,
        TargetIsTrivial = 157,
        BmOrInvisGod = 158,
        ExpertRidingRequirement = 159,
        ArtisanRidingRequirement = 160,
        NotIdle = 161,
        NotInactive = 162,
        PartialPlaytime = 163,
        NoPlaytime = 164,
        NotInBattleground = 165,
        OnlyInArena = 166,
        TargetLockedToRaidInstance = 167,
        Unknown = 168,

        SpellCastOk = 255      // custom value
    };

    public enum SpellCastResultWotLK : uint
    {
        Success = 0,
        AffectingCombat = 1,
        AlreadyAtFullHealth = 2,
        AlreadyAtFullMana = 3,
        AlreadyAtFullPower = 4,
        AlreadyBeingTamed = 5,
        AlreadyHaveCharm = 6,
        AlreadyHaveSummon = 7,
        AlreadyOpen = 8,
        AuraBounced = 9,
        AutotrackInterrupted = 10,
        BadImplicitTargets = 11,
        BadTargets = 12,
        CantBeCharmed = 13,
        CantBeDisenchanted = 14,
        CantBeDisenchantedSkill = 15,
        CantBeMilled = 16,
        CantBeProspected = 17,
        CantCastOnTapped = 18,
        CantDuelWhileInvisible = 19,
        CantDuelWhileStealthed = 20,
        CantStealth = 21,
        CasterAurastate = 22,
        CasterDead = 23,
        Charmed = 24,
        ChestInUse = 25,
        Confused = 26,
        DontReport = 27,
        EquippedItem = 28,
        EquippedItemClass = 29,
        EquippedItemClassMainhand = 30,
        EquippedItemClassOffhand = 31,
        Error = 32,
        Fizzle = 33,
        Fleeing = 34,
        FoodLowLevel = 35,
        HighLevel = 36,
        HungerSatiated = 37,
        Immune = 38,
        IncorrectArea = 39,
        Interrupted = 40,
        InterruptedCombat = 41,
        ItemAlreadyEnchanted = 42,
        ItemGone = 43,
        ItemNotFound = 44,
        ItemNotReady = 45,
        LevelRequirement = 46,
        LineOfSight = 47,
        LowLevel = 48,
        LowCastLevel = 49,
        MainhandEmpty = 50,
        Moving = 51,
        NeedAmmo = 52,
        NeedAmmoPouch = 53,
        NeedExoticAmmo = 54,
        NeedMoreItems = 55,
        NoPath = 56,
        NotBehind = 57,
        NotFishable = 58,
        NotFlying = 59,
        NotHere = 60,
        NotInFront = 61,
        NotInControl = 62,
        NotKnown = 63,
        NotMounted = 64,
        NotOnTaxi = 65,
        NotOnTransport = 66,
        NotReady = 67,
        NotShapeshift = 68,
        NotStanding = 69,
        NotTradeable = 70,
        NotTrading = 71,
        NotUnsheathed = 72,
        NotWhileGhost = 73,
        NotWhileLooting = 74,
        NoAmmo = 75,
        NoChargesRemain = 76,
        NoChampion = 77,
        NoComboPoints = 78,
        NoDueling = 79,
        NoEndurance = 80,
        NoFish = 81,
        NoItemsWhileShapeshifted = 82,
        NoMountsAllowed = 83,
        NoPet = 84,
        NoPower = 85,
        NothingToDispel = 86,
        NothingToSteal = 87,
        OnlyAboveWater = 88,
        OnlyDayTime = 89,
        OnlyIndoors = 90,
        OnlyMounted = 91,
        OnlyNightTime = 92,
        OnlyOutdoors = 93,
        OnlyShapeshift = 94,
        OnlyStealthed = 95,
        OnlyUnderwater = 96,
        OutOfRange = 97,
        Pacified = 98,
        Possessed = 99,
        Reagents = 100,
        RequiresArea = 101,
        RequiresSpellFocus = 102,
        Rooted = 103,
        Silenced = 104,
        SpellInProgress = 105,
        SpellLearned = 106,
        SpellUnavailable = 107,
        Stunned = 108,
        TargetsDead = 109,
        TargetAffectingCombat = 110,
        TargetAurastate = 111,
        TargetDueling = 112,
        TargetEnemy = 113,
        TargetEnraged = 114,
        TargetFriendly = 115,
        TargetInCombat = 116,
        TargetIsPlayer = 117,
        TargetIsPlayerControlled = 118,
        TargetNotDead = 119,
        TargetNotInParty = 120,
        TargetNotLooted = 121,
        TargetNotPlayer = 122,
        TargetNoPockets = 123,
        TargetNoWeapons = 124,
        TargetNoRangedWeapons = 125,
        TargetUnskinnable = 126,
        ThirstSatiated = 127,
        TooClose = 128,
        TooManyOfItem = 129,
        TotemCategory = 130,
        Totems = 131,
        TryAgain = 132,
        UnitNotBehind = 133,
        UnitNotInfront = 134,
        WrongPetFood = 135,
        NotWhileFatigued = 136,
        TargetNotInInstance = 137,
        NotWhileTrading = 138,
        TargetNotInRaid = 139,
        TargetFreeForAll = 140,
        NoEdibleCorpses = 141,
        OnlyBattlegrounds = 142,
        TargetNotGhost = 143,
        TransformUnusable = 144,
        WrongWeather = 145,
        DamageImmune = 146,
        PreventedByMechanic = 147,
        PlayTime = 148,
        Reputation = 149,
        MinSkill = 150,
        NotInArena = 151,
        NotOnShapeshift = 152,
        NotOnStealthed = 153,
        NotOnDamageImmune = 154,
        NotOnMounted = 155,
        TooShallow = 156,
        TargetNotInSanctuary = 157,
        TargetIsTrivial = 158,
        BmOrInvisGod = 159,
        ExpertRidingRequirement = 160,
        ArtisanRidingRequirement = 161,
        NotIdle = 162,
        NotInactive = 163,
        PartialPlaytime = 164,
        NoPlaytime = 165,
        NotInBattleground = 166,
        NotInRaidInstance = 167,
        OnlyInArena = 168,
        TargetLockedToRaidInstance = 169,
        OnUseEnchant = 170,
        NotOnGround = 171,
        CustomError = 172,
        CantDoThatRightNow = 173,
        TooManySockets = 174,
        InvalidGlyph = 175,
        UniqueGlyph = 176,
        GlyphSocketLocked = 177,
        NoValidTargets = 178,
        ItemAtMaxCharges = 179,
        NotInBarbershop = 180,
        FishingTooLow = 181,
        ItemEnchantTradeWindow = 182,
        SummonPending = 183,
        MaxSockets = 184,
        PetCanRename = 185,
        TargetCannotBeResurrected = 186,
        Unknown = 187,

        SpellCastOk = Success
    };

    public enum SpellCastResultClassic : uint
    {
        Success = 0,
        AffectingCombat = 1,
        AlreadyAtFullHealth = 2,
        AlreadyAtFullMana = 3,
        AlreadyAtFullPower = 4,
        AlreadyBeingTamed = 5,
        AlreadyHaveCharm = 6,
        AlreadyHaveSummon = 7,
        AlreadyHavePet = 8,
        AlreadyOpen = 9,
        AuraBounced = 10,
        AutotrackInterrupted = 11,
        BadImplicitTargets = 12,
        BadTargets = 13,
        PvpTargetWhileUnflagged = 14,
        CantBeCharmed = 15,
        CantBeDisenchanted = 16,
        CantBeDisenchantedSkill = 17,
        CantBeMilled = 18,
        CantBeProspected = 19,
        CantCastOnTapped = 20,
        CantDuelWhileInvisible = 21,
        CantDuelWhileStealthed = 22,
        CantStealth = 23,
        CantUntalent = 24,
        CasterAurastate = 25,
        CasterDead = 26,
        Charmed = 27,
        ChestInUse = 28,
        Confused = 29,
        DontReport = 30,
        EquippedItem = 31,
        EquippedItemClass = 32,
        EquippedItemClassMainhand = 33,
        EquippedItemClassOffhand = 34,
        Error = 35,
        Falling = 36,
        Fizzle = 37,
        Fleeing = 38,
        FoodLowLevel = 39,
        GarrisonNotOwned = 40,
        GarrisonOwned = 41,
        GarrisonMaxLevel = 42,
        GarrisonNotUpgradeable = 43,
        GarrisonFollowerOnMission = 44,
        GarrisonFollowerInBuilding = 45,
        GarrisonFollowerMaxLevel = 46,
        GarrisonFollowerMinItemLevel = 47,
        GarrisonFollowerMaxItemLevel = 48,
        GarrisonFollowerMaxQuality = 49,
        GarrisonFollowerNotMaxLevel = 50,
        GarrisonFollowerHasAbility = 51,
        GarrisonFollowerHasSingleMissionAbility = 52,
        GarrisonFollowerRequiresEpic = 53,
        GarrisonMissionNotInProgress = 54,
        GarrisonMissionComplete = 55,
        GarrisonNoMissionsAvailable = 56,
        HighLevel = 57,
        HungerSatiated = 58,
        Immune = 59,
        IncorrectArea = 60,
        Interrupted = 61,
        InterruptedCombat = 62,
        ItemAlreadyEnchanted = 63,
        ItemGone = 64,
        ItemNotFound = 65,
        ItemNotReady = 66,
        LevelRequirement = 67,
        LineOfSight = 68,
        LowLevel = 69,
        LowCastLevel = 70,
        MainhandEmpty = 71,
        Moving = 72,
        NeedAmmo = 73,
        NeedAmmoPouch = 74,
        NeedExoticAmmo = 75,
        NeedMoreItems = 76,
        NoPath = 77,
        NotBehind = 78,
        NotFishable = 79,
        NotFlying = 80,
        NotHere = 81,
        NotInFront = 82,
        NotInControl = 83,
        NotKnown = 84,
        NotMounted = 85,
        NotOnTaxi = 86,
        NotOnTransport = 87,
        NotReady = 88,
        NotShapeshift = 89,
        NotStanding = 90,
        NotTradeable = 91,
        NotTrading = 92,
        NotUnsheathed = 93,
        NotWhileGhost = 94,
        NotWhileLooting = 95,
        NoAmmo = 96,
        NoChargesRemain = 97,
        NoComboPoints = 98,
        NoDueling = 99,
        NoEndurance = 100,
        NoFish = 101,
        NoItemsWhileShapeshifted = 102,
        NoMountsAllowed = 103,
        NoPet = 104,
        NoPower = 105,
        NothingToDispel = 106,
        NothingToSteal = 107,
        OnlyAboveWater = 108,
        OnlyIndoors = 109,
        OnlyMounted = 110,
        OnlyOutdoors = 111,
        OnlyShapeshift = 112,
        OnlyStealthed = 113,
        OnlyUnderwater = 114,
        OutOfRange = 115,
        Pacified = 116,
        Possessed = 117,
        Reagents = 118,
        RequiresArea = 119,
        RequiresSpellFocus = 120,
        Rooted = 121,
        Silenced = 122,
        SpellInProgress = 123,
        SpellLearned = 124,
        SpellUnavailable = 125,
        Stunned = 126,
        TargetsDead = 127,
        TargetAffectingCombat = 128,
        TargetAurastate = 129,
        TargetDueling = 130,
        TargetEnemy = 131,
        TargetEnraged = 132,
        TargetFriendly = 133,
        TargetInCombat = 134,
        TargetInPetBattle = 135,
        TargetIsPlayer = 136,
        TargetIsPlayerControlled = 137,
        TargetNotDead = 138,
        TargetNotInParty = 139,
        TargetNotLooted = 140,
        TargetNotPlayer = 141,
        TargetNoPockets = 142,
        TargetNoWeapons = 143,
        TargetNoRangedWeapons = 144,
        TargetUnskinnable = 145,
        ThirstSatiated = 146,
        TooClose = 147,
        TooManyOfItem = 148,
        TotemCategory = 149,
        Totems = 150,
        TrainingPoints = 151,
        TryAgain = 152,
        UnitNotBehind = 153,
        UnitNotInfront = 154,
        VisionObscured = 155,
        WrongPetFood = 156,
        NotWhileFatigued = 157,
        TargetNotInInstance = 158,
        NotWhileTrading = 159,
        TargetNotInRaid = 160,
        TargetFreeForAll = 161,
        NoEdibleCorpses = 162,
        OnlyBattlegrounds = 163,
        TargetNotGhost = 164,
        TooManySkills = 165,
        TransformUnusable = 166,
        WrongWeather = 167,
        DamageImmune = 168,
        PreventedByMechanic = 169,
        PlayTime = 170,
        Reputation = 171,
        MinSkill = 172,
        NotInRatedBattleground = 173,
        NotOnShapeshift = 174,
        NotOnStealthed = 175,
        NotOnDamageImmune = 176,
        NotOnMounted = 177,
        TooShallow = 178,
        TargetNotInSanctuary = 179,
        TargetIsTrivial = 180,
        BmOrInvisGod = 181,
        GroundMountNotAllowed = 182,
        FloatingMountNotAllowed = 183,
        UnderwaterMountNotAllowed = 184,
        FlyingMountNotAllowed = 185,
        ApprenticeRidingRequirement = 186,
        JourneymanRidingRequirement = 187,
        ExpertRidingRequirement = 188,
        ArtisanRidingRequirement = 189,
        MasterRidingRequirement = 190,
        ColdRidingRequirement = 191,
        FlightMasterRidingRequirement = 192,
        CsRidingRequirement = 193,
        PandaRidingRequirement = 194,
        DraenorRidingRequirement = 195,
        BrokenIslesRidingRequirement = 196,
        MountNoFloatHere = 197,
        MountNoUnderwaterHere = 198,
        MountAboveWaterHere = 199,
        MountCollectedOnOtherChar = 200,
        NotIdle = 201,
        NotInactive = 202,
        PartialPlaytime = 203,
        NoPlaytime = 204,
        NotInBattleground = 205,
        NotInRaidInstance = 206,
        OnlyInArena = 207,
        TargetLockedToRaidInstance = 208,
        OnUseEnchant = 209,
        NotOnGround = 210,
        CustomError = 211,
        CantDoThatRightNow = 212,
        TooManySockets = 213,
        InvalidGlyph = 214,
        UniqueGlyph = 215,
        GlyphSocketLocked = 216,
        GlyphExclusiveCategory = 217,
        GlyphInvalidSpec = 218,
        GlyphNoSpec = 219,
        NoActiveGlyphs = 220,
        NoValidTargets = 221,
        ItemAtMaxCharges = 222,
        NotInBarbershop = 223,
        FishingTooLow = 224,
        ItemEnchantTradeWindow = 225,
        SummonPending = 226,
        MaxSockets = 227,
        PetCanRename = 228,
        TargetCannotBeResurrected = 229,
        TargetHasResurrectPending = 230,
        NoActions = 231,
        CurrencyWeightMismatch = 232,
        WeightNotEnough = 233,
        WeightTooMuch = 234,
        NoVacantSeat = 235,
        NoLiquid = 236,
        OnlyNotSwimming = 237,
        ByNotMoving = 238,
        InCombatResLimitReached = 239,
        NotInArena = 240,
        TargetNotGrounded = 241,
        ExceededWeeklyUsage = 242,
        NotInLfgDungeon = 243,
        BadTargetFilter = 244,
        NotEnoughTargets = 245,
        NoSpec = 246,
        CantAddBattlePet = 247,
        CantUpgradeBattlePet = 248,
        WrongBattlePetType = 249,
        NoDungeonEncounter = 250,
        NoTeleportFromDungeon = 251,
        MaxLevelTooLow = 252,
        CantReplaceItemBonus = 253,
        GrantPetLevelFail = 254,
        SkillLineNotKnown = 255,
        BlueprintKnown = 256,
        FollowerKnown = 257,
        CantOverrideEnchantVisual = 258,
        ItemNotAWeapon = 259,
        SameEnchantVisual = 260,
        ToyUseLimitReached = 261,
        ToyAlreadyKnown = 262,
        ShipmentsFull = 263,
        NoShipmentsForContainer = 264,
        NoBuildingForShipment = 265,
        NotEnoughShipmentsForContainer = 266,
        HasMission = 267,
        BuildingActivateNotReady = 268,
        NotSoulbound = 269,
        RidingVehicle = 270,
        VeteranTrialAboveSkillRankMax = 271,
        NotWhileMercenary = 272,
        SpecDisabled = 273,
        CantBeObliterated = 274,
        CantBeScrapped = 275,
        FollowerClassSpecCap = 276,
        TransportNotReady = 277,
        TransmogSetAlreadyKnown = 278,
        DisabledByAuraLabel = 279,
        DisabledByMaxUsableLevel = 280,
        SpellAlreadyKnown = 281,
        MustKnowSupercedingSpell = 282,
        YouCannotUseThatInPvpInstance = 283,
        NoArtifactEquipped = 284,
        WrongArtifactEquipped = 285,
        TargetIsUntargetableByAnyone = 286,
        SpellEffectFailed = 287,
        NeedAllPartyMembers = 288,
        ArtifactAtFullPower = 289,
        ApItemFromPreviousTier = 290,
        AreaTriggerCreation = 291,
        Unknown = 292,

        // Ok Cast Value - Here In Case A Future Version Removes Success And We Need To Use A Custom Value (Not Sent To Client Either Way)
        SpellCastOk = Success
    }
}
